{layout name="layout2" /}
<style>
    .layui-form-label{
        width: 90px;
    }
</style>
<div class="layui-form" lay-filter="layuiadmin-form-user" id="layuiadmin-form-user" style="padding: 20px 30px 0 0;">
    <input type="hidden" value="{$detail.id}" name="id">
    {if $detail.service_info && $detail.service_info.type == 1}
    <div class="layui-form-item">
        <label class="layui-form-label">姓名：</label>
        <div class="layui-input-inline">
            <label class="layui-form-mid">{$detail.service_info.real_name}</label>
        </div>
        <label class="layui-form-label">手机号：</label>
        <div class="layui-input-inline">
            <label class="layui-form-mid">{$detail.service_info.phone}</label>
        </div>
        <label class="layui-form-label">邮箱：</label>
        <div class="layui-input-inline">
            <label class="layui-form-mid">{$detail.service_info.email}</label>
        </div>
        <label class="layui-form-label">身份证号：</label>
        <div class="layui-input-inline">
            <label class="layui-form-mid">{$detail.service_info.id_card}</label>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">地址：</label>
        <div class="layui-input-block">
            <label class="layui-form-mid">{$detail.service_info.province}{$detail.service_info.city}{$detail.service_info.district}{$detail.service_info.address}</label>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">身份证正面：</label>
        <div class="layui-input-inline">
            <label class="layui-form-mid">
                {if $detail.service_info.id_card_front}
                <img class="image-show" src="{$detail.service_info.id_card_front}" width="80px" height="80px" />
                {else}
                暂无
                {/if}
            </label>
        </div>
        <label class="layui-form-label">身份证反面：</label>
        <div class="layui-input-inline">
            <label class="layui-form-mid">
                {if $detail.service_info.id_card_back}
                <img class="image-show" src="{$detail.service_info.id_card_back}" width="80px" height="80px" />
                {else}
                暂无
                {/if}
            </label>
        </div>
    </div>

    {elseif $detail.service_info && $detail.service_info.type == 2}
    <div class="layui-form-item">
        <label class="layui-form-label">企业名称：</label>
        <div class="layui-input-inline">
            <label class="layui-form-mid">{$detail.service_info.company_name}</label>
        </div>
        <label class="layui-form-label">执照照片：</label>
        <div class="layui-input-inline">
            <label class="layui-form-mid">
                {if $detail.service_info.business_license}
                <img class="image-show" src="{$detail.service_info.business_license}" width="80px" height="80px" />
                {else}
                暂无
                {/if}
            </label>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">法人姓名：</label>
        <div class="layui-input-inline">
            <label class="layui-form-mid">{$detail.service_info.real_name}</label>
        </div>
        <label class="layui-form-label">法人手机号：</label>
        <div class="layui-input-inline">
            <label class="layui-form-mid">{$detail.service_info.phone}</label>
        </div>
    </div>
    {/if}

    <!-- 审批意见 -->
    <fieldset class="layui-elem-field layui-field-title">
        <legend>审批意见</legend>
    </fieldset>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">审批意见</label>
        <div class="layui-input-block">
        <textarea name="approval_reason" placeholder="请输入审批意见（拒绝时必填）" class="layui-textarea"
                  style="min-height: 100px;"></textarea>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">审核结果：</label>
        <div class="layui-input-block">
            <input type="radio" name="approval_status" value="1" title="通过" checked=""></input>
            <input type="radio" name="approval_status" value="2" title="拒绝"></input>
        </div>
    </div>

    <div class="layui-form-item layui-hide">
        <input type="button" lay-submit lay-filter="approval-submit" id="approval-submit" value="确认">
    </div>
</div>
<script>
    layui.config({
        version:"{$front_version}",
        base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'element'], function(){
        var $ = layui.$
            ,form = layui.form
            ,element = layui.element;

        element.on('tab(approval)', function(){
            $('#type').val($(this).attr('data-type'));
        });
    })
</script>